<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head>
    <meta charset="UTF-8">
    <title>云短信</title>
    <div data-th-replace="layout/head-top"></div>
    <style>.progress{height: 20px;}.progress-bar{line-height: 20px;}</style>
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInLeft">
        <div>
            <h4>
                <ol class="breadcrumb">
                    <li>
                        <a href="javascript:void(0)"><i class="fa fa-home"></i> <span>云服务</span></a>
                    </li>
                    <li>
                        <strong>云短信详情</strong>
                    </li>
                </ol>
            </h4>
        </div>
        <div  th:if="${sysConfig['contextTreeMap']['appSecret']} == null" class="alert alert-warning alert-dismissable m-t ">
            <strong>提示说明：</strong>
            <p>还未配置云短信服务，为了不影响涉及短信功能的使用，请尽快配置云短信参数。</p>
        </div>
        <div>
            <div class="row">

                <section class="col-sm-12">
                    <div class="ibox-title">
                        <h5>云短信详情</h5>
                    </div>
                    <div class="ibox-content">
                        <div class="form-horizontal">
                            <form id="sysConfigForm">
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right">云短信服务商</label>
                                <div class="col-sm-8">
                                    <div class="radio i-checks">
                                        <label th:if="${sysConfig['contextTreeMap']['serviceName']} eq 'CSY'">
                                            <!--创世云-->
                                            <input name="serviceName" th:checked="${sysConfig['contextTreeMap']['serviceName']} eq 'CSY'" checked class="course-type-key" type="radio" value="CSY"/>
                                            <strong class="fs18">创世云短信</strong>
                                        </label>
                                        <label>
                                            <!--阿里-->
                                            <input name="serviceName" th:checked="${sysConfig['contextTreeMap']['serviceName']} eq 'AL'"  class="course-type-key" type="radio" value ="AL"/>
                                            <strong class="fs18">阿里云短信</strong>
                                        </label>
                                        <label th:if=" ${sysConfig['contextTreeMap']['serviceName']} == null or ${sysConfig['contextTreeMap']['serviceName']} eq 'AL' or  ${sysConfig['contextTreeMap']['serviceName']} eq ''">
                                            <!--创世云-->
                                            <input name="serviceName" th:checked="${sysConfig['contextTreeMap']['serviceName']} eq 'CSY'" checked class="course-type-key" type="radio" value="CSY"/>
                                            <strong class="fs18">创世云短信</strong>
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="hr-line-dashed" th:classappend="${sysConfig['contextTreeMap']['serviceName']} eq 'CSY'?'':'hide'"></div>
                            <div class="form-group" th:classappend="${sysConfig['contextTreeMap']['serviceName']} eq 'CSY'?'':'hide'">
                                <label class="col-sm-2 control-label text-right"><i class="c-red">*</i> Access Key</label>
                                <div class="col-sm-8">
                                    <input type="text" name="AppKey" th:value="${sysConfig['contextTreeMap']['AppKey']}" class="form-control">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right"><i class="c-red">*</i> Access Key ID</label>
                                <div class="col-sm-8">
                                    <input type="text" name="appId" th:value="${sysConfig['contextTreeMap']['appId']}" class="form-control">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right"><i class="c-red">*</i> Access Key Secret</label>
                                <div class="col-sm-8">
                                    <input type="text" name="appSecret" th:value="${sysConfig['contextTreeMap']['appSecret']}" class="form-control">
                                </div>
                            </div>
                                <div class="hr-line-dashed"></div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label text-right"><i class="c-red">*</i> 短信签名</label>
                                    <div class="col-sm-8">
                                        <input type="text" name="sig" th:value="${sysConfig['contextTreeMap']['sig']}" class="form-control">
                                    </div>
                                </div>
                                <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right">配置内容说明</label>
                                <div class="col-sm-6">
                                    <input type="text" readonly name="depict" th:value="${sysConfig['depict']}" class="form-control"/>
                                </div>
                            </div>
                            <input type="hidden" name="id" th:value="${sysConfig['id']}"/>
                            <input type="hidden" name="configType" th:value="${sysConfig['configType']}"/>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group pt10">
                                <div class="col-sm-4 col-sm-offset-3">
                                    <button class="btn btn-danger" id="saveConfig" type="button">保存配置</button>
                                    <button class="btn btn-white ml10" type="button">取消</button>
                                </div>
                            </div>
                            </form>
                        </div>

                        <hr>
                        <div class="pt10 mt10 contentData" th:if="${sysConfig['contextTreeMap']['serviceName']} eq 'CSY'" >
                            <div class="row">
                                <div class="col-sm-12">
                                    <div class="tabs-container">
                                        <ul class="nav nav-tabs">
                                            <li  class="smsLog active" ><a data-toggle="tab" href="#tab-2" aria-expanded="false"> 发送记录</a></li>
                                            <li  class="smsStatis "><a data-toggle="tab" href="#tab-1" aria-expanded="false"> 消费记录</a></li>
                                        </ul>
                                        <div class="tab-content">
                                            <div id="tab-1" class="tab-pane">
                                                <div class="panel-body">
                                                    <div class="pt10 text-left  col-sm-4">
                                                        <a class="playRecordSubmit">
                                                          <span>
                                                            <button class="btn btn-white" data-toggle="tooltip" data-placement="top" title="" data-original-title="刷新学习记录列表">
                                                              <i class="fa fa-refresh"></i> 刷新
                                                            </button>
                                                          </span>
                                                        </a>
                                                        <span class="ml10">
                                                            <span class="c-999 fs12">（此数据来源于三方平台，存在一定请求数据返回延迟现象!）</span>
                                                        </span>
                                                    </div>
                                                    <div class="pt10 text-right">
                                                        <form id="statis-form" role="form" class="form-inline">
                                                            <div class="form-group" style="margin-bottom: 10px">
                                                                <input placeholder="请输入时间开始" id="statisDateStart" name="start" class="laydate-icon form-control layer-date" type="text">
                                                                <input placeholder="请输入时间结束" id="statisDateEnd" name="end" class="laydate-icon form-control layer-date" type="text">
                                                            </div>
                                                            <button class="btn btn-w-m btn-primary smsStatisSubmit"   type="button" style="margin-bottom: 10px">搜索</button>
                                                        </form>
                                                    </div>
                                                    <div class="pt10" id="smsStatis_list" >

                                                    </div>
                                                </div>
                                            </div>
                                            <div id="tab-2" class="tab-pane active">
                                                <div class="panel-body">
                                                    <div class="pt10 text-left  col-sm-4">
                                                        <a class="coursePlayRecordSubmit">
                                                          <span>
                                                            <button class="btn btn-white" data-toggle="tooltip" data-placement="top" title="" data-original-title="刷新学习记录列表">
                                                              <i class="fa fa-refresh"></i> 刷新
                                                            </button>
                                                          </span>
                                                        </a>
                                                        <span class="ml10">
                                                            <span class="c-999 fs12">（此数据来源于三方平台，存在一定请求数据返回延迟现象!）</span>
                                                        </span>
                                                    </div>
                                                    <div class="pt10 text-right">
                                                        <form id="log-form" role="form" class="form-inline">
                                                            <div class="form-group" style="margin-bottom: 10px">
                                                                <input placeholder="请输入时间开始" id="logDateStart" name="start" class="laydate-icon form-control layer-date" type="text">
                                                                <input placeholder="请输入时间结束" id="logDateEnd" name="end" class="laydate-icon form-control layer-date" type="text">
                                                            </div>
                                                            <button class="btn btn-w-m btn-primary smslogSubmit"   type="button" style="margin-bottom: 10px">搜索</button>
                                                        </form>
                                                    </div>
                                                    <div class="pt10" id="Log_list" >

                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>
            </div>
        </div>
    </div>
    <div data-th-replace="layout/head-footer"></div>
    <script type="text/javascript" th:src="@{{path}/admin/libs/plugins/layer/laydate/laydate.js?v={v}(path=${staticPath},v=${v})}"></script>
    <script type="text/javascript" th:src="@{{path}/admin/business/course/cloud/sms/cloud-sms.js?v={v}(path=${staticPath},v=${v})}"></script>
    <script th:inline="javascript" type="text/javascript">
        var serviceName = [[${sysConfig['contextTreeMap']['serviceName']}]];
        var appSecret = [[${sysConfig['contextTreeMap']['appSecret']}]];
    </script>
</body>
</html>